<!DOCTYPE html>
<html lang="en" style="height: 100%;">
<head>
    <meta charset="UTF-8">
    <title>列表认养产品</title>
    <style>
        .hander_zx{font-size:18px}.conten{background:#fff;margin-top:10px}.conten ul{overflow:hidden;padding:0;margin:0;border-bottom:1px solid #e5e5e5}.conten_floet li{float:left;list-style:none;line-height:45px;text-align:center;width:100px;cursor:pointer;color:#212121;padding:0 10px;}.active{color:#14d882!important;border-bottom:3px solid #14d882}.push_fx li{float:left;font-size:14px;list-style:none;width:10%;text-align:center;background:#f8f8f8;line-height:45px;color:#1f1f1f}.lick_push li{float:left;font-size:14px;width:10%;text-align:center;line-height:45px;list-style:none;color:#616161}.lick_push li:last-child{color:#14d882!important}.lick_push li:last-child span:nth-child(1){margin-right:5px}.lick_push li:last-child span{cursor:pointer}
    </style>
</head>
<body style="height:100%;overflow-x: hidden;margin: 0">
<!--//hander-->
<div class="hander_zx" style="padding: 5px 0 0 10px;">财务报表</div>
<!--内容-->
<div class="conten">
    <ul class="conten_floet">
        <li class="active product">打款牧场主</li>
    </ul>
    <div style="padding: 10px 0 10px 10px;font-size: 12px;">
        <span>目前由于时间急迫，功能实现，样式以后改；</span>
        <div style="margin: 10px 0 10px 0">
            <input type="text" placeholder="请输入打款金额" id="moeny_wp">
            <input type="text" placeholder="请输入手机号码" id="phone_wp">
            <button id="ok_ft">确定</button>
        </div>
    </div>
</div>
</body>
<script src="https://cdn.bootcss.com/jquery/2.1.1-rc2/jquery.min.js"></script>
<script>
    $(function(){
        $("#ok_ft").on('click',function(){
            var w=$("#phone_wp").val();
            var o=$("#moeny_wp").val();
            if(!/^1[1|2|3|4|5|6|7|8|9][0-9]\d{8}$/.test(w)){
                alert("请输入正确的电话号码");
            }
            if(o.length<0||o==""){
                alert("请输入正确的金额")
            }
            var r=confirm("是否确定打款");
            if (r==true)
            {
                $.ajax({
                    type:'POST',
                    url:'/dakuan',
                    dataType: 'json',
                    contentType: "application/json",
                    async: false, //false 同步
                    data:JSON.stringify({
                        phone:w,money:o
                    }),
                    success:function (data) {
                        if(data.code=="00"){
                            alert("操作成功");
                            window.location.reload();
                            return;
                        }
                        alert(data.data);
                    }
                });
            }
            else
            {

            }
        })
    })
</script>
</html>